<?php
use common\widgets\config\ConfigWidget;
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
?>

<script type="text/javascript">
    $(function(){
        var a = $("body").height();
        var b = a/1750-1;
        $("#shang").click(function(){
            var win = $(window).scrollTop();
            var num = win/2-1;
            if(num==0){
                $(window).scrollTop(0);
            }else{
                $("html,body").animate({scrollTop:'-=1740px'},500);
            }
            if($(window).scrollTop()<8000){
                $("#tijiao").remove();
                $("body").append('<input value="" id="xia" style="position: fixed;bottom: 12.3%;left: 53%;width: 350px;height: 120px;background: url(/img/xia.png)no-repeat;background-size: 100% 90%;border: none;" type="submit" id="sub2">');
            }
        })
        $("#xia").click(function(){
            var win = $(window).scrollTop();
            var num = win/2-1;
            if(num==b){
                $(window).scrollTop(0);
            }else{
                $("html,body").animate({scrollTop:'+=1740px'},500);
            }
            if($(window).scrollTop()>=8000){
                $("#xia").remove();
                $("body").append('<input value="" id="tijiao" style="position: fixed;bottom: 12%;left: 53%;width: 350px;height: 120px;background: url(/img/sub.png)no-repeat;background-size: 100% 90%;border: none;" type="submit" id="sub2">');
            }
        })
    })
</script>

<div class="registration-form">


    <?php $form = ActiveForm::begin(); ?>

        <?= ConfigWidget::widget(['model' => $model,'form'=>$form,'auth'=>'basic']) ?>

        <?= ConfigWidget::widget(['model' => $model,'form'=>$form,'auth'=>'traffic']) ?>

        <?= ConfigWidget::widget(['model' => $model,'form'=>$form,'auth'=>'traffic2']) ?>

        <?= ConfigWidget::widget(['model' => $model,'form'=>$form,'auth'=>'food']) ?>

        <?= ConfigWidget::widget(['model' => $model,'form'=>$form,'auth'=>'hotel']) ?>

        <?= ConfigWidget::widget(['model' => $model,'form'=>$form,'auth'=>'forum']) ?>


    <?php ActiveForm::end(); ?>


</div>

<input value="" id="shang" style="position: fixed;bottom: 12%;left: 10%;width: 350px;height: 120px;background: url(/img/shang.png)no-repeat;background-size: 100% 90%;border: none;" type="submit" id="sub3">
<input id="xia" style="position: fixed;bottom: 12.3%;left: 53%;width: 350px;height: 120px;background: url(/img/xia.png)no-repeat;background-size: 100% 90%;border:none;" value="" type="submit" id="sub4">





